<notempty name="base_list">
<style type="text/css">
	#member_list{}
	.accordion-toggle{font-size: 14px;color: #333;}
	#member_list .accordion-group{background: #FFF;}
	#member_list_title{color: #444;font-size: 14px;}
	#member_list .item{height: 20px;}
	#member_list .checkbox-all{border-left: 3px solid #ccc; padding-left: 5px;cursor: pointer;margin-left: 5px;}
	#member_list .checkbox-opp{padding-left: 5px;cursor: pointer;}
</style>
<h5 style="margin-bottom:16px;">员工信息</h5>
<volist name="base_list" id="vo" key="key">
<php>$index++</php>
<div class="accordion" id="accordion2" style="margin:0;">
	<div class="accordion-group">
		<div class="accordion-heading">
			<div class="clearfix">
				<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse-member-{$index}">
					{$vo.team_id|getTeamName}
				</a>
			</div>
		</div>
		<div id="collapse-member-{$index}" class="accordion-body collapse <eq name="index" value="1">in</eq>">
			<div class="accordion-inner">
				<div class="clearfix demand_list">
					<a class="checkbox-all">全选</a>
					<a class="checkbox-opp">反选</a>
					
					<div class="checkbox-group" style="margin:10px;">
						<volist name="vo._child" id="voo">
						<label class="item checkbox inline" style="margin-left: 0px;">
							<input class="chk" type="checkbox" name="member_id[]" value="{$voo.member_id}" <if condition="$voo.is_check eq 1">checked</if> style="width:15px; height:15px; margin:3px;"> {$voo.member_name}<if condition="$voo['is_full'] eq 0"><font class="text-success">[全职]</font><else /><font class="text-warning">[兼职]</font></if>
							<if condition="$type eq 1"><input class="ipt-num" type="text" name="assign_num[{$voo.member_id}][]" onkeyup="value=value.replace(/[a-zA-z]+$/,'')" value="" maxlength="4" style="width:32px; margin:0 5px; height:12px; text-align:center;" ></if>
						</label>
						</volist>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</volist>
<script type="text/javascript">
 	// 全选
 	$(".checkbox-all").bind("click", function() {
 		$(this).nextAll("div.checkbox-group").find("input[type=checkbox]").prop("checked", true)
 	});
 	// 反选
 	$(".checkbox-opp").bind("click", function() {
 		$(this).nextAll("div.checkbox-group").find("input[type=checkbox]").each(function() {
 			var checked = $(this).prop("checked");
 			$(this).prop("checked", !checked);
 		});
 	});

 	// 分配功能-单选框
 	// 键盘(0~9): keycode(48~57)
 	$("input.ipt-num").keydown(function(e){
 		if(48 <= e.keyCode && 57 >= e.keyCode) {
 			$(this).prevAll("input.chk").prop("checked", true);
 		}
 	});

 	// 分配功能-输入框
 	$("input.chk").focus(function(){
 		$(this).nextAll("input.ipt-num").select();
 	});

</script>

</notempty>
